<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
	    <title>Bootstrap 101 Template</title>
	    <!-- Bootstrap -->
	    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
	    <link rel="stylesheet" type="text/css" href="css/Shop.css"/>
	</head>
	<body>
		<div class="Shop_title">
         	添加菜品类型
        </div>
			<div class="insertFoodTypr">
				<table class="table table-hover">
					<tr>
		     			<td>请输入菜品类型:</td>
		     			<td>
							<input type="text" width="100%" />
						</td>
		     		</tr>
		     		<tr>
		     			<td colspan="2">
		     				<input type="button" value="完成" style="height: 40px;"/>
		     			</td>
		     		</tr>
				</table>
			</div>
	</body>
	<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
	<script>
		$("input[type=button]").click(function(){
			var foodTypename1 = $("input[type=text]").val();
			$.ajax({
				type: "POST",
				url: "http://befull.mcaa.win/foodTypeAdd.action",
				data: {
					foodTypename: foodTypename1
				},
				dataType: "JSONP",
				jsonp: "callback",  //传递给请求处理程序或页面的，用以获得jsonp回调函数名的参数名,默认为callback
//			    jsonpCallback: "abc",
				success: function (msg){
					alert(msg.data);
				},
				error: function () {
					console.log("请求超时错误!");
				}
			})
		})
	</script>
	<script>
		
	</script>
</html>
